﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Drawing;
using System.Security.Policy;

namespace Lottery
{
    public class MyResources
    {
        public const String Images = "Images\\";
        public const String Sounds = "Sounds\\";
        public const String Config = "Config\\";
        public const String GiftsName = "Gifts.txt";
        public const String ConfigName = "Config.ini";
        public const String StaffsName = "Staffs.txt";
        public const String WinnersName = "Winners.txt";
        public const String GroupRuleName = "GroupRule.txt";
        public static String GetImagePath(String fileName)
        {
            return Environment.CurrentDirectory + "\\" + Images + fileName;
        }

        public static String GetConfigPath(String fileName)
        {
            return Environment.CurrentDirectory + "\\" + Config + fileName;
        }

        //public static Url GetImageUrl(String fileName)
        //{
        //    return new Url(GetImagePath(fileName));
        //}

        public static String GetSoundsPath(String fileName)
        {
            return Environment.CurrentDirectory + "\\" + Sounds + fileName;
        }

        public static ImageBrush GetImageBrush(String fileName)
        {
            ImageBrush image = new ImageBrush();
            image.ImageSource = new BitmapImage(new Uri(GetImagePath(fileName), UriKind.Relative));
            return image;
        }

        public static Image GetImage(String fileName)
        {
            return System.Drawing.Image.FromFile(GetImagePath(fileName));
        }

    }
}
